package com.example.petgrowing;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DBHelper extends SQLiteOpenHelper {

    private static final int VERSION = 1;
    private static final String DB_NAME = "user.db";

    public static final String TB_NAME = "user";

    public DBHelper(Context context) {

        super(context, DB_NAME, null,VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String sql = "CREATE TABLE "+TB_NAME
                + "(userAccount varchar(10) PRIMARY KEY ,"
                + "userName varchar(10),"
                + "userPassword varchar(10));";
        db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

        }
    }
